﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>交替闪烁的状态栏</title>
    <script type="text/javascript" language="JavaScript">
        let msg = "欢迎来到北京";
        let speed = 1000;
        let control = 1;
        function msgFlash()
        {
            if (control === 1)
            {
                window.status=msg;
                control=0;
            }
            else
            {
                window.status="";
                control=1;
            }
            setTimeout("msgFlash()",speed);
        }
    </script>
</head>
<body onload="msgFlash()">

</body>
</html>